﻿//#define UNITY5
//#define UNITY6
//#define WINDOWS
//#define IOS 
//#define LINUX
//#undef UNITY5

//#define UNITY5
#define UNITY2017
#define UNITY2020
using System;

namespace Csharp进阶_预处理器
{
	class Program
	{
		static void Main(string[] args)
		{
			Console.WriteLine(Cacl(100, 20));
//			#region region
//			 Console.WriteLine("region");
//			#endregion
//#if UNITY5
//			Console.WriteLine("Unity5");
//#elif UNITY6
//			Console.WriteLine("Unity6");
//#else
//			Console.WriteLine("other unity version");
//#endif

			//#warning 这是一个警告
			//#error this is an error
		}

		static int Cacl(int a, int b)
		{
#if UNITY5
			return a + b;
#elif UNITY2017
			return a * b;
#elif UNITY2020
			return a - b;
#else
			Console.WriteLine("other unity version");
			return 0;
#endif
		}
	}
}
